#include <cstdlib>
#include <string>
#include <iostream>
#include <vector>
using namespace std;


class Solution {
public:
	int singleNumber(int A[], int n) {
		int ans = 0;
		for(int i = 0; i < n; ++i){
			ans ^= A[i];
		}
		return ans;
	}
};

int main(int argc, char** argv){
	int A[]{1, 1, 2, 2, 3, 3, 4, 5, 5};
	cout << Solution().singleNumber(A, 9) << endl;
	return 0;
}